package com.ktwlsoft.archivemanage.domain.business.repositoryService.businessInspect;

import java.util.List;

import com.ktwlsoft.archivemanage.domain.dao.entity.businessInspect.InspectSubject;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.businessInspect.IInspectSubjectMapper;

/**
 * inspect_subject--业务检查题目业务层接口实现类
 *
 * @author zhuhe on 2019-11-12 15:00:45
 * @version 1.0
 */
@Service
public class InspectSubjectRepositoryService {

	private final IInspectSubjectMapper InspectSubjectMapper;

	public InspectSubjectRepositoryService(IInspectSubjectMapper InspectSubjectMapper) {
		this.InspectSubjectMapper = InspectSubjectMapper;
	}

	/**
 	 * 查询分页 on 2019-11-12 15:00:45
 	 * @param pn 第几页
     * @param pageSize 每页多少条
 	 * @param inspectSubject inspectSubject
 	 * @return PageInfo<InspectSubject>
 	 */
	public PageInfo<InspectSubject> findPage(int pn, int pageSize, InspectSubject inspectSubject) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<InspectSubject> pageInfo = new PageInfo<InspectSubject>(InspectSubjectMapper.findList(inspectSubject));
		return pageInfo;
	}

    /**
	 * 查询集合 on 2019-11-12 15:00:45
	 * @param inspectSubject inspectSubject
	 * @return List<InspectSubject>
	 */
	public List<InspectSubject> findList(InspectSubject inspectSubject) {
		return InspectSubjectMapper.findList(inspectSubject);
	}

    /**
	 * 根据ID查询信息 on 2019-11-12 15:00:45
	 * @param id	主键
	 * @return InspectSubject
	 */
	public InspectSubject getById(Long id){
		return InspectSubjectMapper.getById(id);
	}

	/**
	 * 根据业务检查id查询信息 on 2019-11-12 15:00:45
	 * @param inspectId	业务检查id
	 * @return InspectSubject
	 */
	public List<InspectSubject> getByInspectId(Long inspectId){
		return InspectSubjectMapper.getByInspectId(inspectId);
	}

   /**
	 * 新增 on 2019-11-12 15:00:45
	 * @param inspectSubject inspectSubject
	 * @return int
	 */
	public int insert(InspectSubject inspectSubject){
		return InspectSubjectMapper.insert(inspectSubject);
	}

	/**
	 * 批量插入 on 2019-04-23 10:57:02
	 * @param list list
	 * @return int
	 */
	public int manyInsert(List<InspectSubject> list){
		return InspectSubjectMapper.manyInsert(list);
	}

   /**
	 * 修改 on 2019-11-12 15:00:45
	 * @param inspectSubject inspectSubject
	 * @return int
	 */
	public int update(InspectSubject inspectSubject){
		return InspectSubjectMapper.update(inspectSubject);
	}

   /**
	 * 根据id集合批量删除信息 on 2019-11-12 15:00:45
	 * @param guidanceSubjectArr	主键编号集合
	 * @return int
	 */
	public int deleteByIds(List<Long> guidanceSubjectArr){
		return InspectSubjectMapper.deleteByIds(guidanceSubjectArr);
	}

   /**
	 * 根据id删除信息 on 2019-11-12 15:00:45
	 * @param id id
	 * @return int
	 */
	public int deleteById(Long id){
		return InspectSubjectMapper.deleteById(id);
	}

   /**
	 * 根据检查id删除信息 on 2019-11-12 15:00:45
	 * @param id id
	 * @return int
	 */
	public int deleteByInspect(Long id){
		return InspectSubjectMapper.deleteByInspect(id);
	}
}
